package com.mjlf.hometeach.common.service.address;

import com.mjlf.hometeach.common.db.address.DistrictDao;
import com.mjlf.hometeach.common.entity.address.District;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @auther a123
 * @create 2018-05-05 10:33
 * @desc 地区服务类
 */
@Service
public class DistrictService implements DistrictDao {

    @Autowired
    private DistrictDao districtDao;

    @Override
    public int save(District district) {
        return districtDao.save(district);
    }

    @Override
    public int deleteById(Integer id) {
        return districtDao.deleteById(id);
    }

    @Override
    public int updateConditionById(District district) {
        return districtDao.updateConditionById(district);
    }

    @Override
    public District getDistrictById(Integer id) {
        return districtDao.getDistrictById(id);
    }

    @Override
    public List<District> listDistrictByCondition(District district) {
        return districtDao.listDistrictByCondition(district);
    }
}
